<?php

$genre = new Genre();

if ($genre->load_by_slug($definition[0],true)) {

	function the_title() {
		global $genre;
		echo utf8_encode($genre->title);
	}
	function the_content() {
		global $genre;
		echo utf8_encode($genre->get_content());
	}
		
	function the_genre_json() {
		global $genre;
?>
			idGenre: '<?php echo $genre->get_id(); ?>',
			title: '<?php echo utf8_encode($genre->get_title()); ?>',
			slug: '<?php echo $genre->slug; ?>',
			content: '<?php echo utf8_encode($genre->get_content()); ?>',
			idParent: '<?php echo $genre->id_parent; ?>',
			creationTime: '<?php echo $genre->creation_time; ?>',
			type: '<?php echo $genre->type; ?>'
<?php
	}
	
} else {

	function the_title() {
		global $site;
		echo $site->lang("Not Found");
	}
	function the_content() {
		global $genre;
		echo $genre->_errmsg;
	}
		
	$cur_section = "404";
	
}

?>